package com.fzhucc.modules.businessCard.repository;

import com.fzhucc.modules.businessCard.domain.BusinessCardPre;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
* @website https://eladmin.vip
* @author yyg
* @date 2022-12-21
**/
public interface BusinessCardPreRepository extends JpaRepository<BusinessCardPre, Integer>, JpaSpecificationExecutor<BusinessCardPre> {

    @Query("SELECT a from BusinessCardPre as a where a.phone=:phone")
    List<BusinessCardPre> findByPhone(String phone);
}